\testfile{pgfplotstest.legend.tex}
\testsection{Legends}
\begingroup
\testsubsection{Old-format legends with two backslashes as separator}
\starttikzpicture
\startloglogaxis[title=A test title,xlabel=Dof,ylabel=Error]
\manylogplotsnolegend
\legend{one\\two\\three\\four\\five\\six\\}
\stoploglogaxis
\stoptikzpicture

\testsubsection{Using comma-separated-legends}
\starttikzpicture
\startloglogaxis[title=A test title,xlabel=Dof,ylabel=Error]
\manylogplotsnolegend
\legend{one,two,three,four,five,six}
\stoploglogaxis
\stoptikzpicture

\testsubsection{testing legend columns}
\starttikzpicture
\startloglogaxis[title=A test title,xlabel=Dof,ylabel=Error,legend columns=2]
\manylogplots
\stoploglogaxis
\stoptikzpicture

\starttikzpicture
\startloglogaxis[title=A test title,xlabel=Dof,ylabel=Error,legend columns=3]
\manylogplots
\stoploglogaxis
\stoptikzpicture

{
\pgfplotsset{every axis legend/.append style={inner sep=0pt,nodes={inner sep=0pt}}}
\starttikzpicture
\startloglogaxis[title=A test title,xlabel=Dof,ylabel=Error,legend columns=4]
\manylogplots
\stoploglogaxis
\stoptikzpicture
}

{\pgfplotsset{every axis legend/.append style={at={(0.5,-0.2)},anchor=north}}
\starttikzpicture
\startloglogaxis[title=A test title,xlabel=Dof,ylabel=Error,legend columns=6]
\manylogplots
\stoploglogaxis
\stoptikzpicture
}%

{\pgfplotsset{every axis legend/.append style={at={(0.5,0.98)},anchor=north,inner sep=0pt}}
\starttikzpicture
\startloglogaxis[title=A test title,xlabel=Dof,ylabel=Error,legend columns=-1]
\manylogplots
\stoploglogaxis
\stoptikzpicture
}%

\testsubsection{``legend plot pos'' options}
\starttikzpicture
\startloglogaxis[title=A test title,xlabel=Dof,ylabel=Error,legend plot pos=left]
\manylogplots
\stoploglogaxis
\stoptikzpicture

\starttikzpicture
\startloglogaxis[title=A test title,xlabel=Dof,ylabel=Error,legend plot pos=right]
\manylogplots
\stoploglogaxis
\stoptikzpicture

\starttikzpicture
\startloglogaxis[title=A test title,xlabel=Dof,ylabel=Error,legend plot pos=none]
\manylogplots
\stoploglogaxis
\stoptikzpicture
\endgroup
